Skip to main content
POST
/
action
/
instant_headshot_run_headshot_generation
[HS1] Generate Headshots
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/instant_headshot_run_headshot_generation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "photos_json": "<string>",
  "style": "professional",
  "background": "studio_white",
  "attire": "keep_original",
  "output_variable_name": "headshot_result",
  "count": "1",
  "quality": "standard",
  "aspect_ratio": "1:1",
  "custom_prompt": "<string>"
}
'
{
  "status": 123,
  "response": {}
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/integrations#api)

Body

application/json
photos_json
string
required

JSON array of photo objects: [{"base64": "...", "mimeType": "image/jpeg"}]. Up to 3 photos.

style
enum<string>
default:professional
required
Available options:
professional,
casual,
creative,
executive,
friendly,
editorial
background
enum<string>
default:studio_white
required
Available options:
studio_white,
studio_gray,
office,
outdoor,
gradient,
abstract
attire
enum<string>
default:keep_original
required
Available options:
business_formal,
business_casual,
smart_casual,
casual,
scrubs,
keep_original
output_variable_name
string
default:headshot_result
required

Reference results as {{headshot_result.images}}, {{headshot_result.run_id}}, etc.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
count
enum<string>
default:1

How many variation images to generate (1-4).

Available options:
1,
2,
3,
4
quality
enum<string>
default:standard

Standard: 1K output, ~15s/image. High: 2K output, ~30s/image.

Available options:
standard,
high
aspect_ratio
enum<string>
default:1:1
Available options:
1:1,
3:4,
4:3,
2:3,
3:2,
9:16,
16:9
custom_prompt
string

Optional: override the auto-generated prompt. Pose angles are appended per variation.

Response

Successful response

status
integer<int32>

HTTP status code of the action response

response
object

Response data from the action